<template>
<div id="Mynav1">
    <el-menu v-if="myNum == 1" :router="true" default-active="/Home/Homemin/Workbench" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" text-color="block" active-text-color="#ffd04b">
        <el-menu-item :index="item.path" v-for="item in menuWo" :key="item.path">{{ item.title }}</el-menu-item>
    </el-menu>
    <el-menu v-if="myNum == 2" :router="true" default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" text-color="block" active-text-color="#ffd04b">
        <el-menu-item :index="item.path" v-for="item in menuNewHouse" :key="item.path">{{ item.title }}</el-menu-item>
    </el-menu>
    <el-menu v-if="myNum == 3" :router="true" default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" text-color="block" active-text-color="#ffd04b">
        <el-menu-item :index="item.path" v-for="item in menuBusiness" :key="item.path">{{ item.title }}</el-menu-item>
    </el-menu>
    <el-menu v-if="myNum == 4" :router="true" default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" text-color="block" active-text-color="#ffd04b">
        <el-menu-item :index="item.path" v-for="item in menuWeb" :key="item.path">{{ item.title }}</el-menu-item>
    </el-menu>
    <el-menu v-if="myNum == 5" :router="true" default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" text-color="block" active-text-color="#ffd04b">
        <el-menu-item :index="item.path" v-for="item in menuApp" :key="item.path">{{ item.title }}</el-menu-item>
    </el-menu>
    <el-menu v-if="myNum == 6" :router="true" default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" text-color="block" active-text-color="#ffd04b">
        <el-menu-item :index="item.path" v-for="item in menuWe" :key="item.path">{{ item.title }}</el-menu-item>
    </el-menu>
    <el-menu v-if="myNum == 7" :router="true" default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" text-color="block" active-text-color="#ffd04b">
        <el-menu-item :index="item.path" v-for="item in menuVip" :key="item.path">{{ item.title }}</el-menu-item>
    </el-menu>
    <el-menu v-if="myNum == 8" :router="true" default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" text-color="block" active-text-color="#ffd04b">
        <el-menu-item :index="item.path" v-for="item in menuSet" :key="item.path">{{ item.title }}</el-menu-item>
    </el-menu>
</div>
</template>

<script>
export default {
    name: "Mynav1",
    data() {
        return {
            menuWo: [{
                    isActive: false,
                    path: "/Home/Homemin/Workbench",
                    name: "my",
                    title: "工作台",
                },
                {
                    isActive: false,
                    path: "/Home/Homemin/Mydepartment",
                    name: "newHouse",
                    title: "我的部门",
                },
                {
                    isActive: false,
                    path: "/Home/Homemin/Predata",
                    name: "web",
                    title: "个人资料",
                },
            ],
            menuNewHouse: [{
                    isActive: false,
                    path: "/Home/Homemin/ReleaseProperty",
                    name: "my",
                    title: "发布楼盘",
                },
                {
                    isActive: false,
                    path: "/Home/Homemin/RealEstateManagement",
                    name: "newHouse",
                    title: "楼盘管理",
                },
                {
                    isActive: false,
                    path: "/Home/Homemin/Preferential",
                    name: "business",
                    title: "淘优惠",
                },
                {
                    isActive: false,
                    path: "/Home/Homemin/Guide",
                    name: "web",
                    title: "咨询导购",
                },
                {
                    isActive: false,
                    path: "/Home/Homemin/ZxHousingManager",
                    name: "app",
                    title: "买房管家",
                },
            ],
            menuBusiness: [{
                    isActive: false,
                    path: "/Home/Homemin/OrderManage",
                    name: "my",
                    title: "订单管理",
                },
                {
                    isActive: false,
                    path: "/Home/Homemin/Refund",
                    name: "newHouse",
                    title: "退款管理",
                },
                {
                    isActive: false,
                    path: "/Home/Homemin/Statistical",
                    name: "business",
                    title: "结算统计",
                },
                {
                    isActive: false,
                    path: "/Home/Homemin/Replace",
                    name: "web",
                    title: "代下订单",
                },
            ],
            menuWeb: [{
                    isActive: false,
                    name: "my",
                    title: "首页"
                },
                {
                    isActive: false,
                    name: "newHouse",
                    title: "页面",
                },
            ],
            menuApp: [{
                    isActive: false,
                    name: "my",
                    title: "暂未开放",
                },
                {
                    isActive: false,
                    name: "newHouse",
                    title: "敬请期待",
                },
            ],
            menuWe: [{
                    isActive: false,
                    name: "my",
                    title: "关于我们",
                },
                {
                    isActive: false,
                    name: "newHouse",
                    title: "联系我们",
                },
            ],
            menuVip: [{
                isActive: false,
                path: "/Home/Homemin/Member",
                name: "my",
                title: "会员管理",
            }, ],
            menuSet: [{
                    isActive: false,
                    path: "/Home/Homemin/Permissions",
                    name: "my",
                    title: "权限设置",
                },
                {
                    isActive: false,
                    path: "/Home/Homemin/SystemConfig",
                    name: "newHouse",
                    title: "运营配置",
                },
                {
                    isActive: false,
                    path: "/Home/Homemin/Statement",
                    name: "newHouse",
                    title: "条款/申明",
                },
            ],
        };
    },
    computed: {
        myNum() {
            return this.$store.state.MenuCount.numMenu;
        },
    },
    methods: {
        handleOpen(key, keyPath) {
            /*  console.log(key, keyPath);*/
        },
        handleClose(key, keyPath) {
            /*console.log(key, keyPath);*/
        },
    },
};
</script>

<style lang="less" scoped>
#Mynav1 {
    width: 200px;
}

.el-menu {
    background-color: #63b7af;
    height: 100%;
}

.el-menu-item:focus,
.el-menu-item:hover {
    background-color: #d4f3ef;
    color: #0000;
}
</style>
